package com.slz3.business.module.memberManagement.memShippingAddress.steward;

import com.slz3.business.module.memberManagement.memShippingAddress.domain.MemShippingAddress;
import com.slz3.business.module.memberManagement.memShippingAddress.domain.MemShippingAddressCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class MemShippingAddressResponse {

    public static Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(MemShippingAddress.class).flatMap(memShippingAddress ->
                MemShippingAddressResController.add(req, memShippingAddress)
        );
    }

    public static Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(MemShippingAddressCondition.class).flatMap(memShippingAddressCondition ->
                MemShippingAddressResController.delete(req, memShippingAddressCondition)
        );
    }

    public static Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(MemShippingAddress.class).flatMap(memShippingAddress ->
                MemShippingAddressResController.modify(req, memShippingAddress)
        );
    }


    public static Mono<ServerResponse> list(ServerRequest req) {
        return MemShippingAddressResController.list(req);
    }

    public static Mono<ServerResponse> info(ServerRequest req) {
        return MemShippingAddressResController.info(req);
    }

    public static Mono<ServerResponse> choice(ServerRequest req) {
        return MemShippingAddressResController.choice(req);
    }

    public static Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(MemShippingAddressCondition.class).flatMap(memShippingAddressCondition ->
                MemShippingAddressResController.auditSubmit(req, memShippingAddressCondition)
        );
    }

    public static Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(MemShippingAddressCondition.class).flatMap(memShippingAddressCondition ->
                MemShippingAddressResController.audit(req, memShippingAddressCondition)
        );
    }

    public static Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(MemShippingAddressCondition.class).flatMap(memShippingAddressCondition ->
                MemShippingAddressResController.auditReject(req, memShippingAddressCondition)
        );
    }

    public static Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(MemShippingAddressCondition.class).flatMap(memShippingAddressCondition ->
                MemShippingAddressResController.usingEnable(req, memShippingAddressCondition)
        );
    }

    public static Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(MemShippingAddressCondition.class).flatMap(memShippingAddressCondition ->
                MemShippingAddressResController.usingDisable(req, memShippingAddressCondition)
        );
    }   

}
